import Vue from 'vue'
import Router from 'vue-router'
//导入登录模块
import signin from '@/components/signin/signin'
//动态获取模块
const home = () =>import ( /* webpackChunkName: "home" */ '@/components/home/home')
const permissionManage = () =>import ( /* webpackChunkName: "permissionManage" */ '@/components/home/systems/permissionManage')
const roleManage = () =>import ( /* webpackChunkName: "roleManage" */ '@/components/home/systems/roleManage')
const usersManage = () =>import ( /* webpackChunkName: "usersManage" */ '@/components/home/systems/usersManage')
const caipiaoList=() =>import ( /* webpackChunkName: "caipiaoList" */ '@/components/home/caipiao/caipiao')

Vue.use(Router)

export default new Router({
	routes: [
		{
			path: "/",
			//重定向路径，默认页面
			redirect: {
				name: 'home'
			}
		}, 
			{
				path: '/home',
				component: home,
				name: 'home',
				children: [
				  {
					path: 'permissionManage',
					name: '权限管理',
					component: permissionManage
				   },
				  {
					path:'roleManage',
					name:"角色管理",
					component:roleManage
				  },
				  {
				  	path:'usersManage',
				  	name:"用户管理",
				  	component:usersManage
				  },
				  {
						path:'caipiaoList',
						name:'彩票列表',
						component:caipiaoList
					}
			]
	}, 
		{
			path: '/signin',
			name: 'signin',
			component: signin
		},
		
	]
})